Skip to content

feat: allow ignoring languages to fix conflicts with image renderers#596

Closed
bezlant wants to merge 1 commit intoMeanderingProgrammer:mainfrom
bezlant:main
Closed

feat: allow ignoring languages to fix conflicts with image renderers#596
bezlant wants to merge 1 commit intoMeanderingProgrammer:mainfrom
bezlant:main

Conversation

@bezlant
Copy link

@bezlant bezlant commented Jan 23, 2026

I've been monkey-patching this into my config for a while to solve a conflict with snacks.nvim.

When rendering diagrams (like mermaid), render-markdown conceals the code block ticks and applies its own styling, which prevents snacks from correctly detecting and rendering the diagram image.

This PR adds an ignore list to the code config (e.g., ignore = { "mermaid" }). If a language is in this list, the plugin will skip rendering it entirely, allowing other tools to handle it without interference.

Please let me know if you think this is a good addition or if there's a better way to handle these conflicts

@MeanderingProgrammer
Copy link
Owner

Hi there, sorry for the delay getting back to this.

I merged a version of this here: 477997f

Just some minor tweaks to share common components / logic when possible.

Also the option is under code.disable instead of code.ignore, but that's just to match the existing code.disable_background option rather than one being better. So with your example you would do:

require('render-markdown').setup({
    code = { disable = { 'mermaid' } },
})

@bezlant
Copy link
Author

bezlant commented Mar 3, 2026

Awesome, I appreciate you getting back to it and I can finally remove my local plugin :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants